package com.aprivate.kn.ratingsystem.daoBean;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Keep;
import org.greenrobot.greendao.annotation.ToMany;

import java.util.List;
import org.greenrobot.greendao.DaoException;
import com.aprivate.kn.ratingsystem.dao.DaoSession;
import com.aprivate.kn.ratingsystem.dao.IntervieweeDao;
import com.aprivate.kn.ratingsystem.dao.ProjectDao;

/**
 * Created by kenan on 2018/11/27.
 * 项目列表项的db
 */
@Entity
public class Project {
    @Id(autoincrement = false)
    private Long id;
    private String name;
    private int templateId;
    private String topicIds;
    private int status;
    private String remark;
    private long createTime;
    private String creator;
    private long editTime;
    private String editor;
    private int yn;
    private String propertyScope;
    private String unitName;
    private String secondUnit;
    private String auditLeaderName;
    private String auditLeaderAddress;
    private String auditLeaderPhone;
    private String auditLeaderEmail;
    private String byAuditLeaderName;
    private String byAuditLeaderAddress;
    private String byAuditLeaderPhone;
    private String byAuditLeaderEmail;
    private boolean  isdown; //评级信息是否已下载

    @ToMany(referencedJoinProperty = "productInfoId")
    private List<Interviewee> auditLeaderInterviewees;
    @ToMany(referencedJoinProperty = "productInfoId")
    private List<Interviewee> byAuditLeaderInterviewees;
    /** Used to resolve relations */
    @Generated(hash = 2040040024)
    private transient DaoSession daoSession;
    /** Used for active entity operations. */
    @Generated(hash = 1378029107)
    private transient ProjectDao myDao;
    @Generated(hash = 1833444584)
    public Project(Long id, String name, int templateId, String topicIds,
            int status, String remark, long createTime, String creator,
            long editTime, String editor, int yn, String propertyScope,
            String unitName, String secondUnit, String auditLeaderName,
            String auditLeaderAddress, String auditLeaderPhone,
            String auditLeaderEmail, String byAuditLeaderName,
            String byAuditLeaderAddress, String byAuditLeaderPhone,
            String byAuditLeaderEmail, boolean isdown) {
        this.id = id;
        this.name = name;
        this.templateId = templateId;
        this.topicIds = topicIds;
        this.status = status;
        this.remark = remark;
        this.createTime = createTime;
        this.creator = creator;
        this.editTime = editTime;
        this.editor = editor;
        this.yn = yn;
        this.propertyScope = propertyScope;
        this.unitName = unitName;
        this.secondUnit = secondUnit;
        this.auditLeaderName = auditLeaderName;
        this.auditLeaderAddress = auditLeaderAddress;
        this.auditLeaderPhone = auditLeaderPhone;
        this.auditLeaderEmail = auditLeaderEmail;
        this.byAuditLeaderName = byAuditLeaderName;
        this.byAuditLeaderAddress = byAuditLeaderAddress;
        this.byAuditLeaderPhone = byAuditLeaderPhone;
        this.byAuditLeaderEmail = byAuditLeaderEmail;
        this.isdown = isdown;
    }
    @Generated(hash = 1767516619)
    public Project() {
    }
    public Long getId() {
        return this.id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getTemplateId() {
        return this.templateId;
    }
    public void setTemplateId(int templateId) {
        this.templateId = templateId;
    }
    public String getTopicIds() {
        return this.topicIds;
    }
    public void setTopicIds(String topicIds) {
        this.topicIds = topicIds;
    }
    public int getStatus() {
        return this.status;
    }
    public void setStatus(int status) {
        this.status = status;
    }
    public String getRemark() {
        return this.remark;
    }
    public void setRemark(String remark) {
        this.remark = remark;
    }
    public long getCreateTime() {
        return this.createTime;
    }
    public void setCreateTime(long createTime) {
        this.createTime = createTime;
    }
    public String getCreator() {
        return this.creator;
    }
    public void setCreator(String creator) {
        this.creator = creator;
    }
    public long getEditTime() {
        return this.editTime;
    }
    public void setEditTime(long editTime) {
        this.editTime = editTime;
    }
    public String getEditor() {
        return this.editor;
    }
    public void setEditor(String editor) {
        this.editor = editor;
    }
    public int getYn() {
        return this.yn;
    }
    public void setYn(int yn) {
        this.yn = yn;
    }
    public String getPropertyScope() {
        return this.propertyScope;
    }
    public void setPropertyScope(String propertyScope) {
        this.propertyScope = propertyScope;
    }
    public String getUnitName() {
        return this.unitName;
    }
    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }
    public String getSecondUnit() {
        return this.secondUnit;
    }
    public void setSecondUnit(String secondUnit) {
        this.secondUnit = secondUnit;
    }
    public String getAuditLeaderName() {
        return this.auditLeaderName;
    }
    public void setAuditLeaderName(String auditLeaderName) {
        this.auditLeaderName = auditLeaderName;
    }
    public String getAuditLeaderAddress() {
        return this.auditLeaderAddress;
    }
    public void setAuditLeaderAddress(String auditLeaderAddress) {
        this.auditLeaderAddress = auditLeaderAddress;
    }
    public String getAuditLeaderPhone() {
        return this.auditLeaderPhone;
    }
    public void setAuditLeaderPhone(String auditLeaderPhone) {
        this.auditLeaderPhone = auditLeaderPhone;
    }
    public String getAuditLeaderEmail() {
        return this.auditLeaderEmail;
    }
    public void setAuditLeaderEmail(String auditLeaderEmail) {
        this.auditLeaderEmail = auditLeaderEmail;
    }
    public String getByAuditLeaderName() {
        return this.byAuditLeaderName;
    }
    public void setByAuditLeaderName(String byAuditLeaderName) {
        this.byAuditLeaderName = byAuditLeaderName;
    }
    public String getByAuditLeaderAddress() {
        return this.byAuditLeaderAddress;
    }
    public void setByAuditLeaderAddress(String byAuditLeaderAddress) {
        this.byAuditLeaderAddress = byAuditLeaderAddress;
    }
    public String getByAuditLeaderPhone() {
        return this.byAuditLeaderPhone;
    }
    public void setByAuditLeaderPhone(String byAuditLeaderPhone) {
        this.byAuditLeaderPhone = byAuditLeaderPhone;
    }
    public String getByAuditLeaderEmail() {
        return this.byAuditLeaderEmail;
    }
    public void setByAuditLeaderEmail(String byAuditLeaderEmail) {
        this.byAuditLeaderEmail = byAuditLeaderEmail;
    }
    public boolean getIsdown() {
        return this.isdown;
    }
    public void setIsdown(boolean isdown) {
        this.isdown = isdown;
    }
    /**
     * To-many relationship, resolved on first access (and after reset).
     * Changes to to-many relations are not persisted, make changes to the target entity.
     */
    @Generated(hash = 794890852)
    public List<Interviewee> getAuditLeaderInterviewees() {
        if (auditLeaderInterviewees == null) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            IntervieweeDao targetDao = daoSession.getIntervieweeDao();
            List<Interviewee> auditLeaderIntervieweesNew = targetDao
                    ._queryProject_AuditLeaderInterviewees(id);
            synchronized (this) {
                if (auditLeaderInterviewees == null) {
                    auditLeaderInterviewees = auditLeaderIntervieweesNew;
                }
            }
        }
        return auditLeaderInterviewees;
    }
    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    @Generated(hash = 1562836052)
    public synchronized void resetAuditLeaderInterviewees() {
        auditLeaderInterviewees = null;
    }
    /**
     * To-many relationship, resolved on first access (and after reset).
     * Changes to to-many relations are not persisted, make changes to the target entity.
     */
    @Generated(hash = 10247633)
    public List<Interviewee> getByAuditLeaderInterviewees() {
        if (byAuditLeaderInterviewees == null) {
            final DaoSession daoSession = this.daoSession;
            if (daoSession == null) {
                throw new DaoException("Entity is detached from DAO context");
            }
            IntervieweeDao targetDao = daoSession.getIntervieweeDao();
            List<Interviewee> byAuditLeaderIntervieweesNew = targetDao
                    ._queryProject_ByAuditLeaderInterviewees(id);
            synchronized (this) {
                if (byAuditLeaderInterviewees == null) {
                    byAuditLeaderInterviewees = byAuditLeaderIntervieweesNew;
                }
            }
        }
        return byAuditLeaderInterviewees;
    }
    /** Resets a to-many relationship, making the next get call to query for a fresh result. */
    @Generated(hash = 2042074999)
    public synchronized void resetByAuditLeaderInterviewees() {
        byAuditLeaderInterviewees = null;
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#delete(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 128553479)
    public void delete() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.delete(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#refresh(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 1942392019)
    public void refresh() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.refresh(this);
    }
    /**
     * Convenient call for {@link org.greenrobot.greendao.AbstractDao#update(Object)}.
     * Entity must attached to an entity context.
     */
    @Generated(hash = 713229351)
    public void update() {
        if (myDao == null) {
            throw new DaoException("Entity is detached from DAO context");
        }
        myDao.update(this);
    }
    /** called by internal mechanisms, do not call yourself. */
    @Generated(hash = 2081800561)
    public void __setDaoSession(DaoSession daoSession) {
        this.daoSession = daoSession;
        myDao = daoSession != null ? daoSession.getProjectDao() : null;
    }
}
